package com.changgou.goods.dao;
import com.changgou.goods.pojo.Sku;
import feign.Param;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

/**
 * @author liyipeng
 * @date 2021-06-26 17:00
 */
public interface SkuMapper extends Mapper<Sku> {
    @Update(value="update tb_sku set num=num-#{num} where id=#{id} and num>=#{num}")
    int decCount(@Param(value="id") Long id, @Param(value="num") Integer num);
}
